package com.skyline.energy.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.skyline.energy.transaction.IsolationLevel;

/**
 * 暂不支持动态数据源（多台物理数据库）
 * 不支持PropagationBehavior.PROPAGATION_NESTED传播行为
 * 
 * @author wuqh
 *
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Transaction {
	IsolationLevel isolation() default IsolationLevel.ISOLATION_READ_COMMITTED;

	boolean readonly() default false;

	Class<? extends Throwable> rollback() default Exception.class;
}
